﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Soft
{

    /// <summary>
    /// 调用结果
    /// </summary>
    [Serializable]
    public class InvokeResult : ResultJson
    {
        public InvokeResult()
        {
        }

        public InvokeResult(IResult result) : base(result)
        {
        }

        public InvokeResult(string error) : base(error)
        {
        }

        public InvokeResult(Exception e) : base(e)
        {
        }

      
        /// <summary>
        /// 调用时长
        /// </summary>
        public long CallMilliseconds { get; set; }


        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="resultJson"></param>
        public void GetData(ResultJson resultJson)
        {
            base.ReceiveResult(resultJson);
            base.Json = resultJson.Json;
        }
    }
}
